<?php


//开始缓存

switch($type){
	//开始缓存
	case'cache':
		include ("libs/IXR_Library.inc.php");
		
		$item_ext = explode(':',$item);
		
		//提交内容
		$data = array (
			'item' => $item_ext,			//所有缓存项目
			'now' => $item_ext[0],		//当前项目
			'page' => (int)$page,		//当前处理页面
		);
		
		//发送数据
		$client = new IXR_Client($server_url . 'systn_cache.php');
		if (!$client->query('systn_post', $data)) {
			die('抱歉，数据发送失败！');
		}
		
		$out =$client->getResponse();
		
		$this_file = $action.'_go';
	break;
	
	
	default:
		//运算处理
		if ($type=='go'){
			if (is_array($cache)){
				unset($k,$v);
				foreach ($cache AS $k=>$v) {
					$item[] = $v;
				}
				header("Location: sys.php?model=admin&action={$action}&type=cache&item=".implode(':',$item));
			}else{
				basic::flash('抱歉，请选择要静态化项目！');
			}
		}
		
		$sql = "SELECT * FROM types ORDER BY orders ASC,tid ASC";
		$query = $db->query($sql);
		
		$this_file = $action;
}



$posturl   = "sys.php?model=admin&action={$action}&type=go";

Basic :: setModelFile('head');
Basic :: setModelFile($this_file);
Basic :: setModelFile('bottom');
$tpl->p($this_file);
?>